<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>后台管理面板</title>
  <!-- 告诉浏览器该页面是自适应布局 -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
   {include file="index/top" /}
</head>
<body class="hold-transition skin-blue sidebar-mini">	
<div class="wrapper">
    <div class="content-wrapper" style="margin-left: 0 !important;">
        <!--页眉-->
        <section class="content-header">
          <h1>数据列表</h1>
        </section>
        <!--内容开始-->
        <section class="content">
            <div class="search">
            	<form class="form-inline" action="{:url('Auth/adminList')}">
                 	<e>数据库中共有 <b>{$result.tableNum}</b> 张表，共计 <b>{$result.total}</b> </e>
                    <input class="btn btn-flat btn-primary m_10" id="backUp" type="button" value="备份">
                    <input class="btn btn-flat btn-success m_10" id="optimize" type="button" value="优化">
                    <input class="btn btn-flat btn-warning m_10" id="repair" type="button" value="修复">
                </form> 
            </div>
            <!--数据表开始-->
            <div class="row">
                <div class="col-xs-12">
                  <div class="box">
                    <div class="box-header">
                    <!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                      <table class="table table-bordered table-hover">
                        <tr>
                          <th class="t_c"><input type="checkbox" id="check"></th>
                          <th class="t_c">数据库表</th>
                          <th class="t_c">记录条数</th>
                          <th class="t_c">占用空间</th>
                          <th class="t_c">类型</th>
                          <th class="t_c">编码</th>
                          <th class="t_c">创建时间</th>
                          <th class="t_c">说明</th>
                        </tr>
                        {volist name='result.data' id='list' empty="$empty"}
                        <tr>
                        	<td class="t_c"><input type="checkbox" name="key[]" value="{$list.name}"></td>
                          <td class="t_c">{$list.name}</td>
                          <td class="t_c">{$list.rows}</td>
                          <td class="t_c">{$list.size}</td>
                          <td class="t_c">{$list.engine}</td>
                          <td class="t_c">{$list.collation}</td>
                          <td class="t_c">{$list.create_time}</td>
                          <td class="t_c">{$list.comment}</td>
                        </tr>
                        {/volist}                       
                      </table>
                    </div>
                    <!-- /.box-body -->
                  </div>
                  <!-- /.box -->
                </div>
              </div>
            <!--数据表结束-->
        </section>
        <!-- right col -->
      </div>
      <!-- /.row (main row) -->

    </section>
        <!--内容结束-->
    </div>
</div>
{include file="index/bottom" /} 

<script>
//备份
$("#backUp").click(function(){
	var url = "{:url('backup')}";
	dbBackup(url);
})
//优化
$("#optimize").click(function(){
	var url = "{:url('optimize')}";
	dbBackup(url);
})
//修复
$("#repair").click(function(){
	var url = "{:url('repair')}";
	dbBackup(url);
})
</script>
</body>
</html>    